{template "content","header"}
<link href="{CSS_PATH}hs/list_products.css" rel="stylesheet" type="text/css" />
<div id="main">
    <div class="main">
        <div class="col-left subCategorys setBoxHeight">
            <ul class="nav">
                {pc:content  action="lists" catid="$catid" order="id ASC" cache=86400 num="25"}
                <!--重新排列数组-->
                {loop $data $v}
                    {php $lists[] = $v}
                {/loop}
                {loop $lists $k $v}
                    <li {if $k == 0}class='active'{/if}><a change-data="#item{$k}">{$v[title]}</a></li>
                {/loop}
            </ul>
        </div>
        <div class="col-right setBoxHeight" id="article">
            {loop $lists $k $v}
                {pc:get sql="select * from v9_news_data where id=$v[id]" return="articles"/}
                <!--重新排列数组-->
                {loop $articles $v}
                    {php $article[] = $v}
                {/loop}
                    <div class="item" id="item{$k}" {if $k != 0}style='display:none;'{/if}>
                        <p class="content">{$v[content]}</p>
                    </div>
                {/pc}
            {/loop}
            {/pc}
        </div>
    </div>
</div>
<script>
$(function(){
    $('#main .nav li').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
        fn.changeShow($(this).find('a'));
    })
})
</script>
{template "content","footer"}